Description
Create a relation between 2 documents. The subject of the relation will be the input of the operation and the object of the relation will be retrieved from the context using the 'object' field. The 'predicate' field specifies the relation predicate (When using a known predicate, use the full URL like 'http://purl.org/dc/terms/IsBasedOn', unknown predicates will be treated as plain strings and be the same on the subject and object). The 'outgoing' flag indicates the direction of the relation - the default is false which means the relation will go from the input object to the object specified as 'object' parameter. Return back the subject document.
Operation id | Document.AddRelation |
Aliases | Relations.CreateRelation
|
Category | Services |
Label | Create Relation |
Requires | |
Since | |
Parameters
Signature
Inputs | document, documents |
Outputs | document, documents |
Implementation Information
JSON Definition
{
"id" : "Document.AddRelation",
"aliases" : [ "Relations.CreateRelation" ],
"label" : "Create Relation",
"category" : "Services",
"requires" : null,
"description" : "Create a relation between 2 documents. The subject of the relation will be the input of the operation and the object of the relation will be retrieved from the context using the 'object' field. The 'predicate' field specifies the relation predicate (When using a known predicate, use the full URL like 'http://purl.org/dc/terms/IsBasedOn', unknown predicates will be treated as plain strings and be the same on the subject and object). The 'outgoing' flag indicates the direction of the relation - the default is false which means the relation will go from the input object to the object specified as 'object' parameter. Return back the subject document.",
"url" : "Document.AddRelation",
"signature" : [ "document", "document", "documents", "documents" ],
"params" : [ {
"name" : "object",
"description" : null,
"type" : "document",
"required" : true,
"widget" : null,
"order" : 0,
"values" : [ ]
}, {
"name" : "predicate",
"description" : null,
"type" : "string",
"required" : true,
"widget" : null,
"order" : 0,
"values" : [ ]
}, {
"name" : "outgoing",
"description" : null,
"type" : "boolean",
"required" : false,
"widget" : null,
"order" : 0,
"values" : [ "false" ]
} ]
}